/*
 * Parser.h
 *
 *  Created on: 2011-10-22
 *      Author: mateusz
 */

#include <string>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include "Depot.h"
#include "Customers.h"

#ifndef PARSER_H_
#define PARSER_H_


class Parser {
public:
	Parser();
	virtual ~Parser();
	bool openLoadFile(std::string fileName);
	bool loadData(std::string fileName, int maxCustomers);
	void closeLoadFile();
	bool openSaveFile(std::string fileName);
	void closeSaveFile();

	void startSaving(std::string fileName);
	void stopSaving(std::string fileName);
	FILE* getSaveFileLink();

private:
	FILE* loadFileLink;
	FILE* saveFileLink;
	bool fileOpened;

};

#endif /* PARSER_H_ */
